|
|
Yup. I'd need some help in creating a quest determined by two globals called: "Slave_unrest" and "Guard_power". Most of you might've figured out what's going on here. But anyways, I'll explain in length: I need a global script checking if the Slave_unrest global is larger in value than the Guard_power. When it is, the PC recieves a journal entry (happens only once), which'll control all the revolting at the mines. The trick here's this: I also need to implement a counter for three weeks, in which another event occurs, a text-box pops up about a courier (yes, like in Daggerfall. I'm a die-hard fan of that game) and the player gets a note in his/her inventory about a visitor in the stronghold. I know this is too hard for my scripting skills, so I'd need a few pointers and tips in where to start?
-------------------- Quoting my favorite madman:
" All these forests shall be lumber for my throne..."
Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"
Some pictures of my latest mod/mods:
http://www.cuneo.us/tesmw/images/Olaf/
Post Extras:
|
Mode_Locrian
|
Diviner
|
|
|
Reged: 10/07/02
|
Posts: 2084
|
Loc: Bjornholm, Rykith Lowlands Region
|
|
|
Try something like this:
Code:
Begin Olaf_slave_quest_global
short threeWeeks short addNote
if ( addNote == 1 ) stopScript, "Olaf_slave_quest_global" endif
if ( getJournalIndex, "Olaf_journal" < 20 ) if ( Slave_unrest > Guard_power ) Journal, "Olaf_journal", 20 set threeWeeks to ( daysPassed + 21 ) endif endif
if ( daysPassed >= threeWeeks ) if ( addNote == 0 ) MessageBox, "A young courier hands you a letter." Player->additem, "Olaf_note", 1 set addNote to 1 endif endif
end
Now, this is a global script, so you'll have to find a way to start it (StartScript, "Olaf_slave_quest_global"). I recommend using the results box of dialogue for someone related to your quest.
-------------------- My Website
Bards of Vvardenfell Thread (New Info 8/15/04)
Post Extras:
|
|
|
I'll give it a try soon. Thankee.
-------------------- Quoting my favorite madman:
" All these forests shall be lumber for my throne..."
Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"
Some pictures of my latest mod/mods:
http://www.cuneo.us/tesmw/images/Olaf/
Post Extras:
|
|
|
Right. I didn't exactly get the script working while I started it from the dialogue. Both values (Guard_power, Slaver_unrest) were zero at the starting point, but when I called it from a conversation the message box from the first branch pops up in the conversation box, and I get a journal entry. What have I done wrong here?
--------------------- Begin Olaf_slave_quest
short threeWeeks short addNote
if ( addNote == 1 ) stopScript, "Olaf_slave_quest" endif
if ( getJournalIndex, "_Painhold_rebellion" < 10 ) if ( Slave_unrest > Guard_power ) Journal, "_Painhold_rebellion", 10 MessageBox, "Suddently, a courier lad dashes to your side. Before you have chances of questioning him, he speaks out that Painhold's slaves have revolted and I should return there at once. After these words were said, he hastily departed." set threeWeeks to ( daysPassed + 21 ) endif endif
if ( daysPassed >= threeWeeks ) if ( addNote == 0 ) MessageBox, "A young courier hands you a letter. Again, you are left alone before you have a chance of questioning the odd courier." Player->additem, "_painhold_letter_Twinlamps", 1 set addNote to 1 endif endif
end
-------------------- Quoting my favorite madman:
" All these forests shall be lumber for my throne..."
Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"
Some pictures of my latest mod/mods:
http://www.cuneo.us/tesmw/images/Olaf/
Post Extras:
|
Mode_Locrian
|
Diviner
|
|
|
Reged: 10/07/02
|
Posts: 2084
|
Loc: Bjornholm, Rykith Lowlands Region
|
|
|
Are you sure that the global variables were both set to 0?
before you initiate the script, try typing sv into the console (when you haven't selected anything) to bring up a list of all the values of global variables, and make sure that Guard_Power and Slave_Unrest are both at 0.
Also, you might want to double check in the CS that these variables actually start at 0; sometimes they get set to a different value (not sure why, or how, but it's happened to me).
-------------------- My Website
Bards of Vvardenfell Thread (New Info 8/15/04)
Post Extras:
|
|
|
My guess would be that those two globals have changed sufficiently to set off the conditional by the time you start the script, so it immediately gives you the message box and journal entry. I don't know how you're controlling Slave_Unrest and Guard_Power, but I'm thinking that something is causing Slave_Unrest to be greater than Guard_Power before the script is even started.
-------------------- Tenth Era
MacHall
"She may look cute, but I've heard she can be quite a... Let's just say she can be hard to handle."
~Hugo the Tactician
"Blinding light, bind my foes in unbreakable chains! Disperse the Shadows! Ray of Paralysis!"
~Saradin Carm
Post Extras:
|
|
|
Oh, darn. I made a mistake. Sorry. The message popping up was the one from the latter part of the script. It seems that threeweeks doesn't have a chance to get defined to 21 days, and the PC gets the note instantly after the script is started. Odd. How can this be fixed?
-------------------- Quoting my favorite madman:
" All these forests shall be lumber for my throne..."
Quoting my favorite barbarian:
"I am the bigger and the stronger, than all these girly monsters"
Some pictures of my latest mod/mods:
http://www.cuneo.us/tesmw/images/Olaf/
Edited by Olaf_Merchant (08/30/04 03:11 PM)
Post Extras:
|
Mode_Locrian
|
Diviner
|
|
|
Reged: 10/07/02
|
Posts: 2084
|
Loc: Bjornholm, Rykith Lowlands Region
|
|
|
Yes, yes, I see the problem now.
Revise the script thusly, and it should work:
Begin Olaf_slave_quest
short threeWeeks short addNote
if ( addNote == 1 ) stopScript, "Olaf_slave_quest" endif
if ( getJournalIndex, "_Painhold_rebellion" < 10 ) if ( Slave_unrest > Guard_power ) Journal, "_Painhold_rebellion", 10 MessageBox, "Suddently, a courier lad dashes to your side. Before you have chances of questioning him, he speaks out that Painhold's slaves have revolted and I should return there at once. After these words were said, he hastily departed." set threeWeeks to ( daysPassed + 21 ) endif endif
if ( GetJournalIndex "_Painhold_rebellion" >= 10 ) ;added this line... now it only makes the check if threeWeeks has already been set. if ( daysPassed >= threeWeeks ) if ( addNote == 0 ) MessageBox, "A young courier hands you a letter. Again, you are left alone before you have a chance of questioning the odd courier." Player->additem, "_painhold_letter_Twinlamps", 1 set addNote to 1 endif endif endif
end
-------------------- My Website
Bards of Vvardenfell Thread (New Info 8/15/04)
Post Extras:
|
|
|
Yup, that should have been it. I would have posted with an answer to you question sooner, but alas, this was the first time I saw this thread.
-------------------- Never laugh at a live dragon.
--Bilbo Baggins, There and Back Again: a Hobbit's Tale (a.k.a. The Hobbit)
Nerds rule the world. No one else knows it yet.
Post Extras:
|